-- =========================================
-- Author: Jacob Gable
-- Created: 02.00.2009
-- Notes: Creation of ExerciseSet table.
-- 
-- 
-- =========================================

IF OBJECT_ID('dbo.ExerciseSet', 'U') IS NOT NULL
  DROP TABLE dbo.ExerciseSet
GO

CREATE TABLE dbo.ExerciseSet
(
	SetId int identity(1,1) NOT NULL,
	WorkoutId int 
		foreign key references Workout(WorkoutId) 
		NOT NULL,
	[Value] decimal NOT NULL, 
	Repetition decimal NOT NULL, 
	Notes nvarchar(1000) NOT NULL,
	ts timestamp NULL,
    CONSTRAINT PK_ExerciseSet PRIMARY KEY (SetId)
)
GO
